home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / pdoxwin / pi0495.zip / LW9504.EXE / easter.sc next >
Text File  |  1995-01-20  |  1KB  |  52 lines

  1. CREATE "easter1"
  2.     "Year"  :   "S*",
  3.     "Month" :   "A5",
  4.     "Day"   :   "S"
  5. ARRAY newdate[4]
  6. newdate[1] = "easter1"
  7. PROC FLOOR(n)
  8.     RETURN INT(n)
  9. ENDPROC
  10. COEDIT "easter1"
  11. FOR easter_year FROM 1950 TO 2000
  12.     golden_number = MOD(easter_year, 19)
  13.                         + 1
  14. century = FLOOR(easter_year/100) + 1
  15. leap_year_correction
  16.     = FLOOR(3*century/4) - 12
  17. lunar_correction
  18.     = FLOOR((8*century+5)/25) - 5
  19. sunday = FLOOR(5*easter_year/4)
  20.             - leap_year_correction
  21.             - 10
  22. epact = MOD(11*golden_number + 20
  23.             + lunar_correction
  24.             - leap_year_correction,
  25.             30)
  26. IF (epact = 25 AND golden_number > 11)
  27.     OR (epact = 24)
  28. THEN
  29.     epact = epact + 1
  30. ENDIF
  31. full_moon = 44 - epact
  32. IF full_moon < 21
  33. THEN
  34.     full_moon = full_moon + 30
  35. ENDIF
  36. easter_sunday = full_moon + 7
  37.     - MOD(sunday + full_moon, 7)
  38. IF easter_sunday > 31
  39. THEN
  40.     easter_sunday
  41.         = easter_sunday - 31
  42.     easter_month = "April"
  43. ELSE
  44.     easter_month = "March"
  45. ENDIF
  46.     newdate[2] = easter_year
  47.     newdate[3] = easter_month
  48.     newdate[4] = easter_sunday
  49.     APPENDARRAY newdate
  50. ENDFOR
  51. RESET
  52.